/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package projetox;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import model.Vantagens;

/**
 *
 * @author edson
 */
public class ProjetoX {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("ProjetoXPU");
        EntityManager em =emf.createEntityManager();
        
        Vantagens v=em.find(Vantagens.class, 1);
        
        System.out.println("a vantagem é:"+v.getNome());
        em.close();
        emf.close();
    }
}
